/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sunsite.service;

import java.util.List;
import sunsite.dao.DatadicDao;
import sunsite.po.Datadic;
import sunsite.po.DatadicType;

/**
 *
 * @author Ruby
 */
public class DatadicServiceImpl implements DatadicService{
    private DatadicDao datadic;

    public List<DatadicType> getAllDatadicTypes()  throws Exception{
        return datadic.getAllDatadicTypes();
    }

    public DatadicType getDatadicType(int typeId)  throws Exception{
        return datadic.getDatadicType(typeId);
    }

    public DatadicType getDatadicType(String typeName)  throws Exception{
        return datadic.getDatadicType(typeName);
    }

    public void setDatadic(DatadicDao datadic) throws Exception {
        this.datadic = datadic;
    }

    public List<Datadic> getDatadicValues(int typeId) throws Exception {
        return datadic.getDatadicValues(typeId);
    }

    public List<Datadic> getDatadicValues(String typeName) throws Exception {
        return datadic.getDatadicValues(typeName);
    }
}
